<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>预约后台管理-后台管理</title>
    <link rel="stylesheet" href="__PUBLIC__/console/css/pintuer.css">
    <link rel="stylesheet" href="__PUBLIC__/console/css/admin.css">
    <script type="text/javascript" src="__PUBLIC__/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/layer/layer.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/ajaxfileupload.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/checkAll.js"></script>
   
    <script src='/Public/js/spectrum.js'></script>
    <script src="__PUBLIC__/console/js/jquery.js"></script>
    <script src="__PUBLIC__/console/js/pintuer.js"></script>
    <script src="__PUBLIC__/console/js/respond.js"></script>
    <script src="__PUBLIC__/console/js/admin.js"></script>
    <script src="__PUBLIC__/console/js/laydate.js"></script>
    <link type="image/x-icon" href="/favicon.ico" rel="shortcut icon" />
    <link href="/favicon.ico" rel="bookmark icon" />
</head>


<!--头部 end-->
    <script type="text/javascript" src="__PUBLIC__/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/layer/layer.min.js"></script>
 <body>
<div class="lefter">
    <div class="logo"><a href="/console/index"><img src="__PUBLIC__/console/images/logo.png" alt="后台管理系统" /></a></div>
</div>
<div class="righter nav-navicon" id="admin-nav">
    <div class="mainer">
        <div class="admin-navbar">
            <span class="float-right">
              <a class="button button-little bg-main" href="/home" target="_blank">前台首页</a>
                <a class="button button-little bg-yellow" href="/Console/Base/quit">注销登录</a>
            </span>
            <ul class="nav nav-inline admin-nav">
                <li class="active"><a href="index.html" class="icon-home"> 开始</a>

                <ul>
                  <li id="shubiao"><a href="/console/console/">后台管理</a></li>
        
                  <li id="shubiao"><a href="/console/team">预约管理</a></li>
                  <li id="shubiao"><a href="/console/Blyuyue">病例预约</a></li>

                  <li id="shubiao"><a href="/console/leave">留言管理</a></li> 

                  <li id="shubiao"><a href="/Console/product">添加医生</a></li>
                  <li id="shubiao"><a href="/Console/type">添加科室</a></li>

                </ul>
                </li>
                
            </ul>
        </div>
        <div class="admin-bread">
            <span>您好，admin，欢迎您的光临。</span>
            <ul class="bread">
                <li><a href="index.html" class="icon-home"> 开始</a></li>
                <li>后台首页</li>
            </ul>
        </div>
    </div>
</div>
<!--内容页-->
<div class="admin">
    <div class="line-big">
        
       
 <!--菜单 end-->


    <div class="panel admin-panel">
    	<div class="panel-head"><strong>宴会案例</strong></div>

        <form action="" method="get" style="float:right;">
              <div style="float:right; margin-right:320px; margin-left:10px;"><input type="submit" class="button button-small border-blue" value="查询" /></div>
                <div style="float:right;">
                    <input type="text" class="input"  name="td_name" size="20" placeholder="请填写宴会标题" />
                
                    <input type="hidden" name='seek' value='1'>        
                </div>
             </form>

<form name="myform" id="myform" method="post">
        <div class="padding border-bottom">
            <a class="button button-small checkall" id="checkAll" type="checkbox" href="#"> 全选 </a>
            <a class="button button-small border-green" href="/console/feast/update">添加宴会 </a>
            <a class="button button-small border-yellow" id="delAll" href="#"> 批量删除 </a>
             
        
        <table class="table table-hover">
        	<tr>
        		<th width="45">选择</th>
        		<th width="120">宴会名称</th>
                <th width="250">宴会简洁</th>
        		<th width="100">添加时间</th>
                <th width="100">排序</th>
        		<th width="100">操作</th>
        	</tr>
             <?php if(is_array($results)): foreach($results as $key=>$v): ?><tr>
               	<td>
            		<input type="checkbox" name="check[]" value="<?php echo ($v["td_id"]); ?>" />
            	</td>
            	<td><?php echo ($v["td_name"]); ?></td>
                <td><?php echo ($v["td_text"]); ?></td>
            	<td><?php echo ($v["add_time"]); ?></td>
                <td><?php echo ($v["sort"]); ?></td>
            	<td>
            		<a class="button border-blue button-little" href="/Console/feast/update/id/<?php echo ($v["td_id"]); ?>">修改</a> 
                    <a class="button border-yellow button-little del" href="" mark="<?php echo ($v["td_id"]); ?>">删除</a>
            	</td>
            </tr><?php endforeach; endif; ?>

        </table>
        <div class="panel-foot text-center">
            <?php echo $show;?>
        </div>

    </div>
 </form>
           <br/>
          </div>
    </div>
   


</body>
</html>
 
 <!--底部 end-->
 <script>
    
    //单选
    $('.del').click(function(){
        var _this = $(this);
        $.layer({
            shade: [0],
            area: ['auto','auto'],
            dialog: {
                msg: '一旦删除后将无法更改，是否确定删除？',
                btns: 2,                    
                type: 5,
                btn: ['确定','取消'],
                yes: function(){
                    
                    $.post('/console/feast/del',{check:_this.attr('mark')},function(data){

                        if ( data.status )
                        {
                            layer.alert(data.info, 1);
                            location.href = '';
                        }
                        else
                        {
                            layer.alert(data.info);
                        }

                    },'json');
       

                }, no: function(){
                   // layer.msg('奇葩', 1, 13);
                }

            }
        });

        return false;    
    })

    //多选
    $('#delAll').click(function(){

        if ( $("[name='check[]']:checked").length <= 0 )
        {
            layer.alert('未选择数据');
            return;
        }

        var _this = $(this);
        $.layer({
            shade: [0],
            area: ['auto','auto'],
            dialog: {
                msg: '一旦删除后将无法更改，是否确定删除？',
                btns: 2,                    
                type: 5,
                btn: ['确定','取消'],
                yes: function(){
                    
                    $.post('/console/feast/del',$('#myform').serialize(),function(data){

                        if ( data.status )
                        {
                            layer.alert(data.info, 1);
                            location.href = '';
                        }
                        else
                        {
                            layer.alert(data.info);
                        }

                    },'json');
       
                }, no: function(){
                   // layer.msg('奇葩', 1, 13);
                }

            }
        });

        return false;    
    })

</script>